package week2;

import java.util.Scanner;

public class Day4 {


    //3.过河卒
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int m = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            long[][] dp = new long[n+1][m+1];
            if(x==0&&y==0) System.out.println(0);
            else {
                dp[0][0]=1;
                for(int i=1;i<m+1;i++) {
                    if( x!=0 && y!=i && Math.abs(0-x)+Math.abs(i-y)==3 || 0==x && i==y ) {
                        dp[0][i]=0;
                        break;
                    }
                    dp[0][i]=dp[0][i-1];
                }
                for(int i=1;i<n+1;i++) {
                    if(x!=i&&y!=0&&Math.abs(i-x)+Math.abs(0-y)==3 || i==x && 0==y) {
                        dp[i][0]=0;
                        break;
                    }
                    dp[i][0]=dp[i-1][0];
                }
                for(int i=1;i<n+1;i++) {
                    for(int j=1;j<m+1;j++) {
                        if(x!=i&&y!=j&&Math.abs(i-x)+Math.abs(j-y)==3 || i==x && j==y) {
                            dp[i][j]=0;
                        }else {
                            dp[i][j]=dp[i-1][j]+dp[i][j-1];
                        }
                    }
                }
                System.out.println(dp[n][m]);
            }
        }
    }
}
